package com.easy.neo4j.controller;

import com.easy.neo4j.service.RouteService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: CoolPro
 * @Description:
 * @Time: 2024-03-28 15:10
 **/
@RestController
@RequestMapping("/route")
public class RouteSchemeController {

    @Resource
    private RouteService routeService;

    @RequestMapping(value = "/find/{type}/{start}/{end}")
    public String findRoute(@PathVariable String type, @PathVariable String start, @PathVariable String end) {
        return routeService.findRoute(start.split(","), end.split(","),type);
    }
}
